package org.hadoop.sort;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.io.WritableComparable;
import org.apache.hadoop.io.WritableComparator;
public class MyComparator extends WritableComparator {
    public MyComparator() {
        //注意构造部分，第二个的true必须要传递，否则会抛出异常
        super(Text.class,true);
    }
    @Override
    public int compare(WritableComparable a, WritableComparable b) {
        int c = b.compareTo(a);
        return c;
    }
}
